<?php
class Admin_UserController extends Zend_Controller_Action
{
    public function init()
    {
        $this->view->headTitle('User list');
        $layoutPath = APPLICATION_PATH . '/templates/admin';
        $option = array('layout' => 'index', 'layoutPath' => $layoutPath);
        Zend_Layout::startMvc($option);
    }
    public function indexAction()
    {
        $muser = new Admin_Model_User;
        $adapter = new Zend_Paginator_Adapter_DbSelect($muser->listall());
        $paginator = new Zend_Paginator($adapter);
        $paginator->setItemCountPerPage(2);
        $paginator->setPageRange(3);
        $currentPage = $this->_request->getParam('page', 1);
        $paginator->setCurrentPageNumber($currentPage);
        $this->view->data = $paginator;
    }
}
?>